{% comment %}
Copyright 2012 Julie Smith.  All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.


This is the Django template for displaying retry options to the user.
{% endcomment %}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC
  "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <title>{{ app_title }}</title>
    <link rel="stylesheet" type="text/css" href="/static/tasks_backup.css" />
        <link rel="shortcut icon" type="image/x-icon" href="/static/favicon.ico" />
        <link rel="icon" type="image/x-icon" href="/static/favicon.ico" />
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <script type="text/javascript">
        // Copyright 2001 Idocs.com      
        // Distribute this script freely, but keep this notice in place

        // backlink object initializer
        function backlink() {
            this.text = 'Go Back';
            this.type = 'link';
            this.write = backlink_write;
            this.form = true;
        }


        // write method
        function backlink_write() {
            if (! window.history) return;
            if (window.history.length == 0)return;

            this.type = this.type.toLowerCase();
            if (this.type == 'button') {
                if (this.form)
                    document.write('<form>');
                document.write('<input type=button onClick="history.back(-1)" value="', this.text, '"');
                if (this.otheratts) document.write(' ', this.otheratts);
                document.write('>');
                if (this.form)document.write('<\/form>');
            } else {
                document.write('<a href="javascript:history.back(-1)"');
                if (this.otheratts)
                    document.write(' ', this.otheratts);
                document.write('>');
                if (this.type == 'image' || this.type == 'img') {
                    document.write('<img src="', this.src, '" alt="', this.text, '"');
                    if (this.width) document.write(' width=', this.width);
                    if (this.height) document.write(' height=', this.height);
                    if (this.otherimgatts) document.write(' ', this.otherimgatts);
                    document.write(' border=0 />');
                }
                else
                    document.write(this.text);
                document.write('<\/a>');
            }
        }        
        
        var gb = new backlink();
        gb.text = "Back to previous page";
        gb.type = "button";
        gb.otheratts = 'class="back-button"';
        gb.write();
    </script>
    <script type="text/javascript">

      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-30118203-1']);
      _gaq.push(['_trackPageview']);

      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
      })();

    </script>
  </head>
  
  <body>
{% if is_authorized %}
    <div class="usertitle">
        Authorised user: {{ user_email }} <span class="logout-link">[ <a href="{{ logout_url }}">Log out</a> ]</span>
    </div>
{% endif %}

    <h2>{{ app_title }}</h2>
  
    <noscript>
        <br />
        <h3>Javascript must be enabled to use this site</h3>
        <br />
    </noscript>
    
    {% if host_msg %}
        <div class="break">
        <h3>{{ host_msg }}</h3>
        </div>
    {% endif %}

    <div class="break take-note-larger">
        {{ msg1 }}
    </div>
    
    {% if msg2 %}
        <div class="break">
            {{ msg2 }}
        </div>
    {% endif %}

    {% if msg3 %}
        <div class="break">
            {{ msg3 }}
        </div>
    {% endif %}

	<div class="project-footer">
        <div class="break">
            Version {{ app_version }} ({{ upload_timestamp }})
        </div>
		<div class="break">
			Questions or comments? Go to <a href="http://{{ url_discussion_group }}">{{ url_discussion_group }}</a>
			or email <a href="mailto:{{ email_discussion_group }}">{{ email_discussion_group }}</a>
		</div>
		<div class="break">
			Please report bugs or suggest improvements at <a href="http:/{{ url_issues_page }}">{{ url_issues_page }}</a>
		</div>
		<div class="break">
			Source code for this project is at <a href="http://{{ url_source_code }}">{{ url_source_code }}</a>
		</div>
        <div class="break">
            {{ app_title }} uses cookies for two purposes;
            <ul>
                <li>To track your authorisation credentials between pages. This ensure that you (and only you) can get the results of your backup request.</li>
                <li><a href="http://www.google.com/analytics/">Google Analytics</a> is used to track usage such as; number of unique visitors, location, browser type, operating system. </li>
            </ul>
        </div>
	</div>

  </body>
</html>
